package com.gateio.flutter.lib_core.model

import androidx.annotation.Keep
import com.gateio.flutter.lib_core.GTLibCoreFlutterPlugin

/**
 * Author: Shper
 * Created: 2023/7/2
 */
@Keep
class GTFlutterEventModel<E : Enum<E>>(
    var action: Enum<E>,
    var dataJson: String
) {
    fun toJSON(): String? {
        return GTLibCoreFlutterPlugin.gson.toJson(
            mutableMapOf(
                "actionType" to this.action.javaClass.simpleName,
                "actionName" to this.action.name,
                "dataJson" to dataJson
            )
        )
    }
}